<?xml version="1.0" encoding="utf-8"?>
<%@page import="java.awt.Button"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="doantotnghiep.model.Customer"%>
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@page import="java.util.ArrayList"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Quản lý khách hàng</title>
 
</head>
<body>
	<br>
	<br>
	<br>
	<div class="tagline_right">
		<fieldset>
			<legend>Site Search</legend>
			<input type="text" value="Tìm kiếm thông tin nhà cung cấp"
				id="providerkeyword"
				onfocus="if (this.value == 'Tìm kiếm thông tin nhà cung cấp') {this.value = '';}"
				onblur="if (this.value == '') {this.value = 'Tìm kiếm thông tin nhà cung cấp';}" />
			<input type="button" id="providersearch" value="Search" />
		</fieldset>
	</div>
	<div>
			<h1 style="color: blue;">QUẢN LÝ NHÀ CUNG CẤP</h1>
			<div align="center">
				<div id="table">
					<table class="table1" id="providertable">
						<tr>
							<th scope="col" abbr="Starter">Mã công ty</th>
							<th scope="col" abbr="Starter">Tên công ty</th>
							<th scope="col" abbr="Starter">Địa chỉ</th>
							<th scope="col" abbr="Starter">Điện thoại</th>
							<th scope="col" abbr="Starter">Email</th>
							<th scope="col" abbr="Starter"></th>
							<th scope="col" abbr="Starter"></th>
						</tr>
						
							<c:forEach items="${listAllProvider.providerDTOs}" var="provider"
								varStatus="status">
								<tr class="<c:if test="${status.count % 2 == 0}">even</c:if>">
									<td>${provider.id}</td>
									<td>${provider.fullName}</td>
									<td>${provider.address}</td>
									<td>${provider.telNumber}</td>
									<td>${provider.email}</td>
									<td><a
										href="#" onclick="updateProvider(${provider.id})"><img src="<c:url value="/resources/images/edit-icon.png"/>" /></a
											></td>
											<td><a
										href="#" onclick="deleteProvider(${provider.id})"> <img src="<c:url value="/resources/images/delete-icon1.png"/>" />
											</a
											></td>
								</tr>
							</c:forEach>
							
				<div align="left">
					<a href="#"><input class="button" id="addprovider" type="button" 
						value="Thêm"></a> 	
				</div>
					</table>
					
					<div id="providerpaging"></div>
					
					<script type="text/javascript">
						var pager = new Pager('providertable', 7);
						pager.init();
						pager.showPageNav('pager', 'providerpaging');
						pager.showPage(1);
					</script>
				</div>
				<input 
						id="closeviewtable" type="button"
						value="Đóng" />
			</div>
	</div>

</body>
</html>